package com.genexususa.eo.bing.test.update;

import com.genexususa.eo.bing.connection.GoalManager;
import com.genexususa.eo.bing.test.TestUtil;

public class ConsumeUpdateGoals {
    public static void main(String[] args) {
        TestUtil testUtil = new TestUtil();
        String goalsXML =   "<Bing_GoalCollection xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts\">\n" +
                                "\t<Goal xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts\">\n" +
                                    "\t\t<DaysApplicableForConversion>Seven</DaysApplicableForConversion>\n" +
                                    "\t\t<GxGoalId>6065415489</GxGoalId>\n" +
                                    "\t\t<BingGoalId>" + testUtil.goalId1 + "</BingGoalId>\n" +
                                    "\t\t<Name>New Goal Name 1</Name>\n" +
                                    "\t\t<RevenueModel>\n" +
                                        "\t\t\t<ConstantRevenueValue>124</ConstantRevenueValue>\n" +
                                    "\t\t</RevenueModel>\n" +
                                    "\t\t<StepCollection>\n" +
                                        "\t\t\t<Step>\n" +
                                            "\t\t\t\t<GxStepId>109460465</GxStepId>\n" +
                                            "\t\t\t\t<BingStepId>" + testUtil.stepId11 + "</BingStepId>\n" +
                                            "\t\t\t\t<Name>New Step Name 11</Name>\n" +
                                        "\t\t\t</Step>\n" +
                                        "\t\t\t<Step>\n" +
                                            "\t\t\t\t<GxStepId>109460466</GxStepId>\n" +
                                            "\t\t\t\t<BingStepId>" + testUtil.stepId12 + "</BingStepId>\n" +
                                            "\t\t\t\t<Name>New Step Name 12</Name>\n" +
                                            "\t\t\t\t<Script>New Step Script 12</Script>\n" +
                                        "\t\t\t</Step>\n" +
                                    "\t\t</StepCollection>\n" +
                                "\t</Goal>\n" +
                                "\t<Goal xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts\">\n" +
                                    "\t\t<CostModelCollection>\n" +
                                        "\t\t\t<CostModel>Taxed</CostModel>\n" +
                                    "\t\t</CostModelCollection>\n" +
                                    "\t\t<GxGoalId>6065415490</GxGoalId>\n" +
                                    "\t\t<BingGoalId>" + testUtil.goalId2 + "</BingGoalId>\n" +
                                    "\t\t<Name>New Goal Name 2</Name>\n" +
                                    "\t\t<RevenueModel>\n" +
                                        "\t\t\t<Type>Variable</Type>\n" +
                                    "\t\t</RevenueModel>\n" +
                                    "\t\t<StepCollection>\n" +
                                        "\t\t\t<Step>\n" +
                                            "\t\t\t\t<GxStepId>109460467</GxStepId>\n" +
                                            "\t\t\t\t<BingStepId>" + testUtil.stepId21 + "</BingStepId>\n" +
                                            "\t\t\t\t<Name>New Step Name 21</Name>\n" +
                                        "\t\t\t</Step>\n" +
                                        "\t\t\t<Step>\n" +
                                            "\t\t\t\t<GxStepId>109460468</GxStepId>\n" +
                                            "\t\t\t\t<BingStepId>" + testUtil.stepId22 + "</BingStepId>\n" +
                                            "\t\t\t\t<Name>New Step Name 22</Name>\n" +
                                        "\t\t\t</Step>\n" +
                                    "\t\t</StepCollection>\n" +
                                    "\t\t<YEventId>45640652</YEventId>\n" +
                                "\t</Goal>\n" +
                            "</Bing_GoalCollection>\n";
        GoalManager resource = new GoalManager();
        System.out.println("Consuming UpdateGoals.....");
        String userName = testUtil.userName;
        String password = testUtil.password;
        String developerToken = testUtil.developerToken;
        long customerId = testUtil.customerId;
        long customerAccountId = testUtil.customerAccountId;
        String applicationId = testUtil.applicationId;
        long accountId = testUtil.accountId1;
        //String result = resource.updateGoals(userName, password, developerToken, customerId, customerAccountId, applicationId, accountId, goalsXML);
        //System.out.println("Result:\n" + result);
    }
}
